import Vue from 'vue'
import { Button, Message, Icon, Input, FormItem, Form, Popover, Card, Tabs, TabPane, Table, ButtonGroup, TableColumn, Option, Select, Dialog, Radio, Tag, Divider, Checkbox,
  Switch, Image, Upload, Progress

} from 'element-ui'

Vue.use(Button)
Vue.use(Progress)
Vue.use(Icon)
Vue.use(Input)
Vue.use(FormItem)
Vue.use(Form)
Vue.use(Popover)
Vue.use(Card)
Vue.use(Tabs)
Vue.use(TabPane)
Vue.use(Table)
Vue.use(ButtonGroup)
Vue.use(TableColumn)
Vue.use(Option)
Vue.use(Select)
Vue.use(Dialog)
Vue.use(Radio)
Vue.use(Tag)
Vue.use(Divider)
Vue.use(Checkbox)
Vue.use(Switch)
Vue.use(Image)
Vue.use(Upload)
Vue.prototype.$message = Message
// 自定义重载错误接口
Vue.prototype.$error = function (msg, offset = 20, duration = 2000) {
  Message.error({ message: msg, offset: offset, duration: duration })
}
// 自定义重载接口
Vue.prototype.$success = function (msg, offset = 20, duration = 2000) {
  Message.success({ message: msg, offset: offset, duration: duration })
}
